<?php /* CONTACTS $Id: do_contact_aed.php,v 1.5 2005/01/17 07:48:25 ajdonnison Exp $ */
require_once(DP_BASE_DIR."/modules/masterdata/mdjobtitle.class.php");
$obj = new CMdJobTitle();
$msg = '';

if (!$obj->bind( $_POST )) {
	$AppUI->setMsg( $obj->getError(), UI_MSG_ERROR );
	$AppUI->redirect();
}
$del = intval(dPgetParam( $_REQUEST, 'del', 0 ));

// prepare (and translate) the module name ready for the suffix
$AppUI->setMsg( 'Job title' );

if ($del>0) {
	if (($msg = $obj->delete())) {
		$AppUI->setMsg( $msg, UI_MSG_ERROR );
		$AppUI->redirect();
	} else {
		$AppUI->setMsg( "deleted", UI_MSG_ALERT, true );
		$AppUI->redirect( "m=masterdata" );
	}
}
$AppUI->redirect();
?>